Skip to main content

Week 1 — Set Theory, Relations and Functions

1. Number Systems​

Mathematics uses different sets of numbers for different purposes.

1.1 Natural Numbers​

The natural numbers are:

N={0,1,2,3,…}\mathbb{N} = \{0,1,2,3,\ldots\}

IITM convention: 00 is considered a natural number in this course.

Important properties​

  • 00 is even.
  • 11 is neither prime nor composite.
  • Natural numbers are closed under addition and multiplication.

1.2 Integers​

The set of integers is:

Z={…,−3,−2,−1,0,1,2,3,…}\mathbb{Z} = \{\ldots,-3,-2,-1,0,1,2,3,\ldots\}

Every natural number is an integer:

N⊆Z\mathbb{N} \subseteq \mathbb{Z}

1.3 Rational Numbers​

A rational number can be expressed as:

pq\frac{p}{q}

where

p,q∈Z,q≠0p,q \in \mathbb{Z}, \qquad q \ne 0

The set of rational numbers is denoted by:

Q\mathbb{Q}

Examples:

12,−73,5=51\frac{1}{2},\quad -\frac{7}{3},\quad 5=\frac{5}{1}

1.4 Irrational Numbers​

An irrational number cannot be expressed as a ratio of two integers.

Examples:

2,3,π\sqrt{2},\quad \sqrt{3},\quad \pi

1.5 Real Numbers​

The real numbers consist of both rational and irrational numbers:

R=Q∪{irrational numbers}\mathbb{R} = \mathbb{Q} \cup \{\text{irrational numbers}\}

The number systems form the hierarchy:

N⊆Z⊆Q⊆R\mathbb{N} \subseteq \mathbb{Z} \subseteq \mathbb{Q} \subseteq \mathbb{R}

2. Basic Properties of Numbers​

2.1 Even Numbers​

An integer nn is even if:

n=2kn = 2k

for some k∈Zk \in \mathbb{Z}.

Examples:

0,2,4,6,−2,−40,2,4,6,-2,-4

2.2 Odd Numbers​

An integer nn is odd if:

n=2k+1n = 2k+1

for some k∈Zk \in \mathbb{Z}.

Examples:

1,3,5,−1,−31,3,5,-1,-3

2.3 Prime Numbers​

A prime number is a natural number greater than 11 having exactly two positive factors:

1andp1 \quad \text{and} \quad p

Examples:

2,3,5,7,112,3,5,7,11

Important:

1 is neither prime nor composite.1 \text{ is neither prime nor composite.}

2.4 Composite Numbers​

A natural number greater than 11 that is not prime is composite.

Examples:

4,6,8,9,104,6,8,9,10

Thus:

0,10,1

are neither prime nor composite.

3. Sets​

A set is a collection of distinct objects.

The objects inside a set are called elements or members.

Example:

A={1,2,3,4}A = \{1,2,3,4\}

Here:

2∈A2 \in A

but:

5∉A5 \notin A

4. Representing Sets​

4.1 Roster Form​

List all elements explicitly.

A={1,2,3,4,5}A = \{1,2,3,4,5\}

4.2 Set-Builder Form​

Describe the property satisfied by the elements.

A={x∈N∣x<6}A = \{x \in \mathbb{N} \mid x < 6\}

4.3 Empty Set​

A set containing no elements is called the empty set.

Notation:

∅\varnothing

or

{}\{\}

5. Subsets​

Set AA is a subset of BB if every element of AA is also an element of BB.

Notation:

A⊆BA \subseteq B

Example:

A={1,2},B={1,2,3}A = \{1,2\},\qquad B = \{1,2,3\}

Therefore:

A⊆BA \subseteq B

Every set is a subset of itself:

A⊆AA \subseteq A

The empty set is a subset of every set:

∅⊆A\varnothing \subseteq A

6. Proper Subsets​

If:

A⊆BA \subseteq B

and:

A≠BA \ne B

then AA is a proper subset of BB.

Notation:

A⊂BA \subset B

7. Cardinality​

The cardinality of a finite set is the number of elements it contains.

If:

A={2,4,6,8}A = \{2,4,6,8\}

then:

∣A∣=4|A| = 4

8. Set Operations​

Let:

A={1,2,3}A = \{1,2,3\}

and:

B={3,4,5}B = \{3,4,5\}

8.1 Union​

The union contains elements belonging to either set.

A∪B={1,2,3,4,5}A \cup B = \{1,2,3,4,5\}

8.2 Intersection​

The intersection contains elements common to both sets.

A∩B={3}A \cap B = \{3\}

8.3 Difference​

The difference A−BA-B contains elements in AA but not in BB.

A−B={1,2}A-B = \{1,2\}

Similarly:

B−A={4,5}B-A = \{4,5\}

8.4 Complement​

If UU is the universal set, the complement of AA is:

Ac=U−AA^c = U-A

It contains all elements of UU that are not in AA.

9. Important Set Identities​

Commutative Laws​

A∪B=B∪AA \cup B = B \cup A A∩B=B∩AA \cap B = B \cap A

Associative Laws​

(A∪B)∪C=A∪(B∪C)(A \cup B) \cup C = A \cup (B \cup C) (A∩B)∩C=A∩(B∩C)(A \cap B) \cap C = A \cap (B \cap C)

Distributive Laws​

A∩(B∪C)=(A∩B)∪(A∩C)A \cap (B \cup C) = (A \cap B) \cup (A \cap C) A∪(B∩C)=(A∪B)∩(A∪C)A \cup (B \cap C) = (A \cup B) \cap (A \cup C)

De Morgan's Laws​

(A∪B)c=Ac∩Bc(A \cup B)^c = A^c \cap B^c (A∩B)c=Ac∪Bc(A \cap B)^c = A^c \cup B^c

Identity Laws​

A∪∅=AA \cup \varnothing = A A∩U=AA \cap U = A

Complement Laws​

A∪Ac=UA \cup A^c = U A∩Ac=∅A \cap A^c = \varnothing

10. Cardinality of Sets​

For two finite sets:

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B|

If AA and BB are disjoint:

A∩B=∅A \cap B = \varnothing

then:

∣A∪B∣=∣A∣+∣B∣|A \cup B| = |A| + |B|

11. Cartesian Product​

The Cartesian product of AA and BB is:

A×B={(a,b)∣a∈A, b∈B}A \times B = \{(a,b) \mid a \in A,\ b \in B\}

Example:

A={1,2}A = \{1,2\} B={x,y}B = \{x,y\}

Then:

A×B={(1,x),(1,y),(2,x),(2,y)}A \times B = \{(1,x),(1,y),(2,x),(2,y)\}

If:

∣A∣=m,∣B∣=n|A| = m,\qquad |B| = n

then:

∣A×B∣=mn|A \times B| = mn

12. Relations​

A relation from AA to BB is a subset of the Cartesian product:

R⊆A×BR \subseteq A \times B

For example:

A={1,2,3}A = \{1,2,3\}

and:

R={(1,2),(2,3)}R = \{(1,2),(2,3)\}

is a relation on AA.

13. Types of Relations​

For a relation RR on a set AA:

13.1 Reflexive​

RR is reflexive if:

(a,a)∈R(a,a) \in R

for every:

a∈Aa \in A

13.2 Symmetric​

RR is symmetric if:

(a,b)∈R⇒(b,a)∈R(a,b) \in R \Rightarrow (b,a) \in R

13.3 Antisymmetric​

RR is antisymmetric if:

(a,b)∈Rand(b,a)∈R(a,b) \in R \quad \text{and} \quad (b,a) \in R

implies:

a=ba=b

13.4 Transitive​

RR is transitive if:

(a,b)∈Rand(b,c)∈R(a,b) \in R \quad \text{and} \quad (b,c) \in R

implies:

(a,c)∈R(a,c) \in R

14. Functions​

A function is a special type of relation.

A function:

f:A→Bf:A\rightarrow B

assigns exactly one element of BB to every element of AA.

We write:

y=f(x)y=f(x)

15. Domain, Codomain and Range​

For:

f:A→Bf:A\rightarrow B

Domain​

The set AA is the domain.

Codomain​

The set BB is the codomain.

Range​

The range is the set of values actually produced by the function.

Range⁡(f)={f(x)∣x∈A}\operatorname{Range}(f) = \{f(x) \mid x \in A\}

Important:

Range⁡(f)⊆Codomain⁡(f)\operatorname{Range}(f) \subseteq \operatorname{Codomain}(f)

The range and codomain are not necessarily the same.

16. Determining the Domain​

For a real-valued function, expressions must be defined over the domain.

Square root​

For:

f(x)=3−xf(x)=\sqrt{3-x}

we require:

3−x≥03-x\geq0

Therefore:

x≤3x\leq3

Hence:

Domain⁡(f)=(−∞,3]\operatorname{Domain}(f)=(-\infty,3]

and because the positive square root is used:

Range⁡(f)=[0,∞)\operatorname{Range}(f)=[0,\infty)

Denominator​

For:

f(x)=1x−2f(x)=\frac{1}{x-2}

we require:

x−2≠0x-2\ne0

Therefore:

x≠2x\ne2

17. Injective Functions​

A function is injective (one-to-one) if different inputs always produce different outputs.

Formally:

f(a)=f(b)⇒a=bf(a)=f(b)\Rightarrow a=b

Equivalent form:

a≠b⇒f(a)≠f(b)a\ne b\Rightarrow f(a)\ne f(b)

Example:

f(x)=2x+1f(x)=2x+1

is injective over R\mathbb{R}.

18. Surjective Functions​

A function:

f:A→Bf:A\rightarrow B

is surjective if every element of BB is produced by at least one element of AA.

Formally:

∀y∈B, ∃x∈A such that f(x)=y\forall y\in B,\ \exists x\in A \text{ such that } f(x)=y

Thus:

Range⁡(f)=Codomain⁡(f)\operatorname{Range}(f)=\operatorname{Codomain}(f)

19. Bijective Functions​

A function is bijective if it is both:

  • injective, and
  • surjective.

Therefore:

Bijective=Injective+Surjective\boxed{\text{Bijective}=\text{Injective}+\text{Surjective}}

A bijective function has a unique inverse function.

20. Many-to-One Functions​

A function is many-to-one when multiple inputs can produce the same output.

For example:

f(x)=x2f(x)=x^2

because:

f(2)=4f(2)=4

and:

f(−2)=4f(-2)=4

Therefore, ff is not injective over R\mathbb{R}.

21. One-to-One and Onto: Quick Test​

PropertyQuestion to ask
FunctionDoes every input have exactly one output?
InjectiveCan two different inputs have the same output?
SurjectiveDoes every codomain value get hit?
BijectiveIs it both injective and surjective?

22. Composition of Functions​

Given:

f:A→Bf:A\rightarrow B

and:

g:B→Cg:B\rightarrow C

their composition is:

(g∘f)(x)=g(f(x))(g\circ f)(x)=g(f(x))

The function ff is evaluated first.

In general:

g∘f≠f∘gg\circ f\ne f\circ g

23. Identity Function​

The identity function is:

I(x)=xI(x)=x

For a function with an inverse:

f−1∘f=If^{-1}\circ f=I

and:

f∘f−1=If\circ f^{-1}=I

24. Inverse Functions​

A function ff has an inverse if it is bijective between the relevant domain and codomain.

The inverse is written:

f−1f^{-1}

and satisfies:

f−1(f(x))=xf^{-1}(f(x))=x

and:

f(f−1(x))=xf(f^{-1}(x))=x